package cn.edu.stu.controller;

import java.util.List;

import javax.annotation.Resource;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import cn.edu.stu.entity.Activity;
import cn.edu.stu.service.ActivityService;

@Controller
@RequestMapping("/activity.do")
public class ActivityController {
	protected final transient Log log = LogFactory
	.getLog(ActivityController.class);
	@Autowired
	private ActivityService activityService;
	public ActivityController(){
		
	}
	
	@RequestMapping
	public String load(ModelMap modelMap){
		List<Object> list = activityService.getActivityList();
		modelMap.put("list", list);
		return "main";
	}
	
}